import Vue from 'vue'
import Router from 'vue-router'
import Index from '../views/index.vue'
import Home from '../views/home.vue'
import Login from '../views/login.vue'

import tables from'./department.js'
import personal from './personal.js'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'active',
  routes: [
    {path: '/', redirect: '/login'},
    {path: '/login',name:'login',component: Login},
    {path: '/home',component: Index,children:[{path:'',component:Home,meta: ['首页'],},]},
    {path:'/personal',redirect:'personal/mine',component:Index,children:personal},
    {path:'/tables',redirect:'tables/department',component:Index,children:tables},
    {path:'*',redirect:'home'}
  ]
})
